// pages/ScenicArea/ScenicAreaCommitPage/paySuccess/index.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        payment: '',
        cardId: ''
    },
    onLoad: function (options) {
        console.log(options, '444444')

        this.setData({
            cardId: options.cardId ? options.cardId : '',
            //   payment: (options.payment / 100).toFixed(2), 
            payment: options.payment
        },
            () => {
                wx.setNavigationBarTitle({
                    title: '支付成功'
                })
            }
        )
    },
    goBack() {
        wx.navigateBack({
            delta: 1
        })
    },
    // 跳转订单
    toOrderDetail() {
        var that = this
        console.log(that.data.cardId)
        if (that.data.cardId == '') {
            console.log("bushi")
            wx.redirectTo({
                url: '/pages/ScenicArea/ScenicAreaOrder/index?status=2',
            })
        } else if (that.data.cardId == 'yanchu') {
            wx.redirectTo({
                url: '/packageA/pages/performs/performOrderList/performOrderList?status=2',
            })
        } else {
            console.log("shi")
            wx.redirectTo({
                url: '/pages/ScenicArea/NianCardOrder/index?status=2',
            })
        }
    }
})